package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkJuniorBill;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkJuniorBillVo;
import com.ruoyi.logistic.mapper.NetworkJuniorBillMapper;
import com.ruoyi.logistic.service.NetworkJuniorBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class NetworkJuniorBillServiceImpl implements NetworkJuniorBillService {
    @Autowired
    private NetworkJuniorBillMapper networkJuniorBillMapper;

    @Override
    public List<NetworkJuniorBill> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkJuniorBillMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkJuniorBill networkJuniorBill) {
        return networkJuniorBillMapper.insert(networkJuniorBill);
    }

    @Override
    public Boolean update(NetworkJuniorBill networkJuniorBill) {
        return networkJuniorBillMapper.update(networkJuniorBill);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkJuniorBillMapper.deleteById(id);
    }

    @Override
    public List<NetworkJuniorBill> search(NetworkJuniorBillVo networkJuniorBillVo) {
        PageHelper.startPage(networkJuniorBillVo.getPageDate());
        return networkJuniorBillMapper.search(networkJuniorBillVo);
    }
}
